home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Shareware City / Developers / PlayerPRO 4.4.1 Dev.Kit / Import⁄Export / PPInOut.h < prev    next >
Encoding:
Text File  |  1995-04-09  |  2.3 KB  |  83 lines  |  [TEXT/MPCC]

  1. /********************                        ***********************/
  2. //
  3. //    Player PRO 4.4x -- Plug IMPORT / EXPORT Definition
  4. //
  5. //    Version 1.0
  6. //
  7. //    To use with PlayerPRO for Think C & CodeWarrior
  8. //
  9. //    Antoine ROSSET
  10. //    16 Tranchees
  11. //    1206 GENEVA
  12. //    SWITZERLAND
  13. //    
  14. //    FAX:            (+41 22) 346 11 97
  15. //    Compuserve:    100277,164
  16. //    Internet:         rosset@dial.eunet.ch
  17. //
  18. //    Your main function have to be in this form:
  19. //    OSErr main( OSType order, FSSpec *AlienFileFSSpec, MADPartition *MadFile, PPInfoRec *info, short *PitchTable);
  20. //
  21. //    Actual plug have to support these orders:
  22. //
  23. //    order: 'TEST':    check the AlienFile to see if your Plug really support it.
  24. //    order: 'IMPT':    convert the AlienFile into a MADPartition. You have to allocate MADPartition.
  25. //    order: 'INFO':    Fill PPInfoRec structure.
  26. //    order: 'EXPT':    Convert the MADPartition into AlienFile. You have to allocate AlienFile.
  27. //                Don't delete the MADPartition Structure after conversion !!
  28. //
  29. //    An IMPORT plug have to support these orders: 'TEST', 'IMPT', 'INFO'
  30. //    An EXPORT plug have to support these orders: 'EXPT'
  31. //     An IMPORT/EXPORT plug have to support these orders: 'TEST', 'IMPT', 'INFO', 'EXPT'
  32. //
  33. //    About Resources:
  34. //
  35. //    Your Plug should have: Creator: 'SNPL', Type: 'IMPL'
  36. //
  37. //    Your Plug have to have these resources:
  38. //
  39. //    - One segment CODE 1000 with 68k Code
  40. //    - One segment PPCC 1000 with PPC Code (OPTIONAL: if PlayerPRO in PPC cannot find it, it will use the CODE 1000 resource)
  41. //    - One STR# resource :
  42. //
  43. //        1 string: which kind of files your plug support (OSType value!!!) By example: 'STrk', '669 ', etc...
  44. //        2 string: what does your Plug: EXPL : only Export files, IMPL : only Import Files, EXIM : import AND export.
  45. //        3 string: string that will be used in Import and Export menu of PlayerPRO
  46. //        4 string: Copyright string of this plug.
  47. //
  48. /********************                        ***********************/
  49.  
  50. #if defined(powerc) || defined(__powerc)
  51. #pragma options align=mac68k
  52. #endif
  53.  
  54. typedef struct
  55. {
  56.     Str63    internalFileName;
  57.     Str63    formatDescription;
  58.     
  59.     long        totalPatterns;
  60.     long        partitionLength;
  61.     
  62.     short    totalTracks;
  63.     short    totalInstruments;
  64.     
  65.     OSType    signature;
  66.     
  67.     long        fileSize;
  68.     
  69. } PPInfoRec;
  70.  
  71. #if defined(powerc) || defined(__powerc)
  72. #pragma options align=reset
  73. #endif
  74.  
  75. enum
  76. {
  77.     orderNotImplemented        = -1,
  78.     needMoreMemory            = -2,
  79.     fileNotSupportedByThisPlug    = -3,
  80.     unknowError                = -4,
  81.     cannotFindPlug                = -5
  82. };
  83.